package behavior.visitor;

public class Test {
    public static void main(String[] args) {
        ObjectStructure objectStructure = new ObjectStructure();
        objectStructure.attach(new Man());
        objectStructure.attach(new Woman());

        objectStructure.display(new Success());
        /* 输出---
            男人评价成功
            女人评价成功
        */
        objectStructure.display(new Fail());
        /* 输出---
           男人评价失败
           女人评价失败
        */
    }
}
